package 程序.数组;

public class 数组的最大值和最小值 {
    public static void main(String[] args) {
        int[] scores = {33,66,99,87,56,32,22};
        int max=0;
        int min=scores[0];
        for(int i=0;i<scores.length;i++){
            if(scores[i]>max){
                max=scores[i];
            }
            if(scores[i]<min){
                min=scores[i];
            }
        }
        System.out.println(max);
        System.out.println(min);

    }
}
